package Text19;
import java.util.*;
public class Main {
    static int N=100010;
    static int n,k;
    static int[]h=new int[N];
    static int[]w=new int[N];
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n=scanner.nextInt();
        k=scanner.nextInt();
        for (int i = 0; i < n; i++) {
            h[i]=scanner.nextInt();
            w[i]=scanner.nextInt();
        }
        int l=1;
        int r=100000;
        while (l<r){
            int mid=l+r+1>>1;
            if(check(mid)){
                l=mid;
            }else{
                r=mid-1;
            }
        }
        System.out.println(l);
    }

    private static boolean check(int x) {
        int res=0;
        for (int i = 0; i < n; i++) {
            res+=(w[i]/x)*(h[i]/x);
            if(res>=k){
                return true;
            }
        }
       return false;
    }
}
